package com.ww.prodiver.kafka;

import org.springframework.kafka.core.KafkaTemplate;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

/**
 * @ClassName:
 * @author:
 * @Description:
 * @Date
 **/
@Component
public class KafkaProducer {
    @Resource
    KafkaTemplate<String,Object> kafkaTemplate;

    public void sendMessage(){
        kafkaTemplate.send("testTopic","hi kafka");
    }
}
